const mongoose =require('mongoose')
const Schema = mongoose.Schema;

// Create Schema  todo 也可以const userSchema = mongoose.Schema({
const ProfileSchema = mongoose.Schema({
    type: {
        type: String     //收支类型  转账充值手续费等
    },
    describe: {
        type: String
    },
    income: {         //收入
        type: String,
        required: true
    },
    expend: {          //花费 支出
        type: String,
        required: true
    },
    cash: {              //账户现金
        type: String,
        required: true
    },
    remark: {            //备注
        type: String
    },
    date: {            //创建时间
        type: Date,
        default: Date.now
    }
})

module.exports= Profile= mongoose.model('profile',ProfileSchema)
